<script>
import {getLocalStorage} from "./utils/util";
import {STORAGE_KEY} from "./config/constant";

export default {
  onLaunch: function () {
    // 进入APP后跳转至哪个页面
    let userInfo = getLocalStorage(STORAGE_KEY.userInfo)
    if (!userInfo) {
      //不存在则跳转至登录页
      uni.reLaunch({
        url: "/pages/login/login",
        success: () => {
        }
      })
      return
    }
  },
  onShow: function () {
  },
  onHide: function () {
    console.log('App Hide')
  },
}
</script>

<style lang="scss">
@import "uview-plus/index.scss";
</style>
